<template>
	<view class="teamBox">
		<view class="list flex-row flex-between">
			<view class="title">系统版本</view>
			<view class="version">{{getVersion}}</view>
		</view>
		<!-- <view class="list  flex-row flex-between" @click="gopassworde">
			<view class="title">修改登录密码</view>
			<view class="time flex-row">
				
				<image src="../../static/icon/right_arrow.png"></image>
			</view>
		</view> -->
		<view class="logout" @click="logout">退出登录</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				getVersion:'2.0'
			};
		},
		onLoad(option) {
			let that = this
			let type=0
			 let platform=uni.getSystemInfoSync().platform
			    if(platform=='ios'){
			          type=0
			    }else if(platform=='android'){
			          type=1
			    }
				console.log(type)
				this.$http.get('/public/getVersion', {type:type}).then(res => {
					console.log(res)
					if (res.code == '0') {
						
						
					}
				})
			
		},
		methods: {
			gopassworde(){
			  uni.navigateTo({
			  	url:'../forget/index'
			  })	
			},
			
			logout(){
				uni.clearStorageSync()
				uni.showToast({
					title: '退出成功',
					icon: 'none'
				});
				setTimeout(function(){
					uni.navigateTo({
						url:'../login/login'
					})
				},1500)
				
			},
			
		}
	};
</script>

<style scoped lang="scss">
	
	.teamBox{
		padding: 0 30upx;
		background: #fff;
		position: relative;
		.logout{
			color: #fff;
			font-size: 30upx;
			text-align: center;
			line-height: 80upx;
			width:600upx;
			height:80upx;
			position: fixed;
			left: 75upx;
			bottom: 90upx;
			background:rgba(255,32,32,1);
			border-radius:8upx;
		}
		.list{
			padding: 30upx 0;
			background: #fff;
			border-bottom: 1upx solid rgba(238,238,238,1);
			&:last-child{
				border-bottom: none;
			}
			.title{
				font-size: 30upx;
				color: #22222A;
				padding-bottom: 28upx;
			}
			.version{
				font-size: 24upx;
				color: #22222A;
			}
			.time{
				font-size: 24upx;
				color: #FE590B;
				align-items: center;
				image{
					margin-left: 10upx;
					width: 16upx;
					height: 28upx;
					vertical-align: middle;
				}
			}
		}
	}
</style>
